//
//  ShopAndOpenListViewController.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/10/23.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "ShopAndOpenListViewController.h"
#import "MerchantManagerViewController.h"
#import "OpenManagerViewController.h"
@interface ShopAndOpenListViewController ()

@property(nonatomic,strong)MerchantManagerViewController *shopSearch;

@property(nonatomic,strong)OpenManagerViewController*openSearch;

@end

@implementation ShopAndOpenListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addChildViewController:self.shopSearch];
    
    [self addChildViewController:self.openSearch];
    
    [self.backScrollView addSubview:self.shopSearch.view];
    
    [self.backScrollView addSubview:self.openSearch.view];
    
    // Do any additional setup after loading the view.
}


-(MerchantManagerViewController*)shopSearch
{
    if (!_shopSearch) {
        
        JobListModel *list=[JobListModel new];
        
        _shopSearch=[MerchantManagerViewController new];
        
        _shopSearch.isEdit=NO;
        
        _shopSearch.isdeleMore=NO;
        
        _shopSearch.searchName=@"输入商户名称";
   
        _shopSearch.title=@"商户列表";
        
        _shopSearch.pushType=1;
        
        list.type=self.Choosetype;
        
        _shopSearch.Reqmodel=list;

        _shopSearch.view.frame=CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-64);
        
    }

    return _shopSearch;
}


-(OpenManagerViewController*)openSearch
{
    if (!_openSearch) {
        
        JobListModel *list=[JobListModel new];
        
        _openSearch=[OpenManagerViewController new];
        
        _openSearch.isEdit=NO;
        
        _openSearch.isdeleMore=NO;
        
        _openSearch.searchName=@"输入开办方名称";
   
        _openSearch.title=@"开办方列表";
    
        _openSearch.pushType=1;
        
         list.type=self.Choosetype;
        
         _openSearch.Reqmodel=list;
       
        _openSearch.view.frame=CGRectMake(SCREEN_WIDTH, 0, SCREEN_WIDTH, SCREEN_HEIGHT-64);
    }
    
    return _openSearch;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
